#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<string>
#include <algorithm>
using namespace std;

void butterfly_transform(vector<int>& arr, int left, int right)
{
	if (right - left <= 1) 
	{
		return;
	}
	vector<int> odd, even;
	for (int i = left; i <= right; ++i) 
	{
		if ((i - left) % 2 == 0) 
		{
			odd.push_back(arr[i]);
		}
		else 
		{
			even.push_back(arr[i]);
		}
	}
	int mid = left + odd.size();
	copy(odd.begin(), odd.end(), arr.begin() + left);
	copy(even.begin(), even.end(), arr.begin() + mid);
	butterfly_transform(arr, left, mid - 1);
	butterfly_transform(arr, mid, right);
}

void t1()
{
	int n;
	while (cin >> n)
	{
		vector<int> arr(n);
		for (int i = 0; i < n; i++)
		{
			cin >> arr[i];
		}
		butterfly_transform(arr, 0, n - 1);
		for (int i = 0; i < n; ++i) 
		{
			cout << arr[i] << " ";
		}
	}
}

string addStrings(const string& num1, const string& num2) {
    string result;
    int carry = 0, i = num1.size() - 1, j = num2.size() - 1;
    while (i >= 0 || j >= 0 || carry) {
        int sum = carry;
        if (i >= 0) sum += num1[i--] - '0';
        if (j >= 0) sum += num2[j--] - '0';
        result.push_back(sum % 10 + '0');
        carry = sum / 10;
    }
    reverse(result.begin(), result.end());
    return result;
}

string subtractStrings(const string& num1, const string& num2) {
    string result;
    int borrow = 0, i = num1.size() - 1, j = num2.size() - 1;
    while (i >= 0 || j >= 0) {
        int diff = (i >= 0 ? num1[i--] - '0' : 0) - (j >= 0 ? num2[j--] - '0' : 0) - borrow;
        if (diff < 0) {
            diff += 10;
            borrow = 1;
        }
        else {
            borrow = 0;
        }
        result.push_back(diff + '0');
    }
    while (result.size() > 1 && result.back() == '0') result.pop_back();
    reverse(result.begin(), result.end());
    return result;
}

string multiplyStrings(const string& num1, const string& num2) {
    if (num1 == "0" || num2 == "0") return "0";
    vector<int> result(num1.size() + num2.size(), 0);
    for (int i = num1.size() - 1; i >= 0; --i) {
        for (int j = num2.size() - 1; j >= 0; --j) {
            int mul = (num1[i] - '0') * (num2[j] - '0');
            int sum = mul + result[i + j + 1];
            result[i + j] += sum / 10;
            result[i + j + 1] = sum % 10;
        }
    }
    string res;
    for (int num : result) {
        if (!(res.empty() && num == 0)) {
            res.push_back(num + '0');
        }
    }
    return res.empty() ? "0" : res;
}

string karatsubaMultiply(const string& num1, const string& num2) {
    int n = max(num1.size(), num2.size());
    if (n <= 32) return multiplyStrings(num1, num2);

    n = (n / 2) + (n % 2);
    string x1 = num1.substr(0, num1.size() - n);
    string x0 = num1.substr(num1.size() - n);
    string y1 = num2.substr(0, num2.size() - n);
    string y0 = num2.substr(num2.size() - n);

    string z0 = karatsubaMultiply(x0, y0);
    string z1 = karatsubaMultiply(addStrings(x0, x1), addStrings(y0, y1));
    string z2 = karatsubaMultiply(x1, y1);

    return addStrings(addStrings(z2 + string(2 * n, '0'), subtractStrings(z1, addStrings(z2, z0)) + string(n, '0')), z0);
}

void t2()
{
    string A, B;
    while (cin >> A)
    {
        cin >> B;
        cout << karatsubaMultiply(A, B) << endl;
    }
}

int main()
{
	//t1();
    t2();
	return 0;
}
